yjx.directive('updatePage',['$timeout','$compile',function($timeout,$compile){
    return{
        restrict: 'A',
        scope: false,
        link: function ($scope, $element, attr) {
            $scope._updated = false;
            $scope.$watch(attr.updatePage, function (newVal) {
                $timeout(function () {
                    $scope.addhtml(newVal);
                })
                var html = ''
                var temp = attr.updateTemple;
               
                $scope.addhtml = function (updated) {
                    html +=temp
                    //});
                    //console.info($scope.mockList)
                    var $html = $compile(html)($scope);
                    $element.html($html);
                }
            })
        }
    }
}])